﻿
using Bootstrap5.Abstractions;

using Microsoft.AspNetCore.Components;

namespace Bootstrap5;

/// <summary>
/// 表示栅格的列。
/// </summary>
[CssClass("col")]
public class Column : BootstrapChildContentComponentBase
{
    /// <summary>
    /// 列占比。
    /// </summary>
    [Parameter] public IGridDecorator Col { get; set; }
    /// <summary>
    /// 列的偏移数。
    /// </summary>
    [Parameter] public IGridDecorator Offset { get; set; }

    protected override void BuildExtraCssClassProvider(ICssClassBuilder builder)
    {
        Col?.BuildClass(builder);
        Offset?.BuildClass(builder);
    }
}
